package com.sram.controller.webService;

import com.sram.entity.User;
import com.sram.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.io.IOException;
import java.util.List;

/**
 * Created by Administrator on 2017/5/4.
 */
@Controller
@RequestMapping("/webService")
public class webService {
    @Resource
    private UserService userService;
    @RequestMapping(value="/webService")
    @ResponseBody
    public  List<User> getAllUser() throws Exception {
        List<User> all = userService.getAll();
        return all;
    }
}
